<?php
include '../../templates/db/db.php';

$email = $_POST['email'];

if(empty($email)){
   echo "<img src='../img/close.png' width='15px' style='margin-left: 10px;' />";
   echo "<p class='error'>Кратък e-mail</p>";
   $email_mistake = true;
} else if(!eregi("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+.[a-z]{2,4}$", $email)){
   echo "<img src='../img/close.png' width='15px' style='margin-left: 10px;' />";
   echo "<p class='error'>Невалиден e-mail</p>";
   $email_mistake = true;
} else {
   echo "<img src='../img/check.png' width='15px' style='margin-left: 10px;' />";
}